package com.mofeng.myshop.controller.portal;


import com.mofeng.myshop.domain.dto.CarmineDto;
import com.mofeng.myshop.domain.dto.search.CarmineQo;
import com.mofeng.myshop.service.CarmineService;
import com.mofeng.myshop.until.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author 作者
 * @since 2024-11-10
 */
@Tag(name = "卡密 相关接口", description = "卡密")
@RequiredArgsConstructor(onConstructor_ = @Autowired)
@RestController
@RequestMapping("/portal/carmine")
public class CarmineController {
    private final CarmineService carmineService;

    @GetMapping("/{code}")
    @Operation(summary = "使用卡密")
    public R useCarmine(@PathVariable("code") String code) {
        return carmineService.useCarmine(code);
    }

}